#ifndef __INTEGRATE_H__
#define __INTEGRATE_H__

/** 
 * \brief Integrator
 *
 * The calculation depends on sampling frequency
 *
 * \ingroup Model 
 *
 * \param[in] x input
 * \param z internal state
 * \param[in] SamplingTime
 *
 * \return double integrator
 */
static __inline double integrate(double x, double* z, const double SamplingTime)
{
    *z += x;
    return *z * SamplingTime;
}

#endif // __INTEGRATE_H__
